<template>
  <div>
    <!-- Navbar导航栏 -->
    <div class="header_box">
      <span @click="$router.go(-1)" v-if="$route.path!='/home'">
        <van-icon style="margin-right:3px;" name="arrow-left" />
        返回
      </span>
      澳门皇家赌场
    </div>
    <div class="getposition"></div>
    <!-- 路由占位符 -->
    <router-view></router-view>
    <!-- Tabbar标签栏 -->
    <van-tabbar class="tabbar" v-model="active" active-color="#07c160" inactive-color="#ff3040" route>
      <van-tabbar-item to="/welcome" icon="wap-home-o">首页</van-tabbar-item>
      <van-tabbar-item to="/member" icon="gem-o">会员</van-tabbar-item>
      <van-tabbar-item to="/shopcar" icon="cart-circle-o">购物车</van-tabbar-item>
      <van-tabbar-item to="/search" icon="search">搜索</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: 'home',
  data () {
    return {
      active: 'home'
    }
  }
}
</script>

<style lang="less" scoped>
.header_box {
  width: 100%;
  height: 40px;
  background: #1989fa;
  text-align: center;
  line-height: 40px;
  color: #fff;
  font-size: 14px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  span {
    position: fixed;
    top: 0px;
    display: flex;
    align-items: center;
    left: 15px;
  }
}
.getposition {
  height: 40px;
  position: relative;
  z-index: -999;
}
</style>
